<template>
    <p>{{ message }}</p>
    <Child3 :onEvent="dataFn" />
</template>
<!-- 子传父，局限性：只能传一个参数，且参数必须是函数 -->
<script>
import Child3 from './Child3.vue';
export default {
    data() {
        return {
            message: "",
        }
    },
    comments: {
        Child3
    },
    methods: {
        dataFn() {

            this.message = data;
        }
    },
}
</script>


</style>